package com.it.park.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.it.park.client.service.NoticeService;
import com.it.park.dao.NoticeMapper;
import com.it.park.model.Notice;

@Service("noticeService")
public class NoticeServiceImpl extends BaseServiceImpl<Notice> implements NoticeService {
	
	@Autowired
	private NoticeMapper noticeMapper;
	

	@Override
	public List<Notice> listRelUser(Map<String,Object> map) {
		return noticeMapper.listRelUser(map);
	}

	@Override
	public void updateClickRate(Integer id) {
		noticeMapper.updateClickRate(id);
	}

	@Override
	public Notice getPrevById(Integer id) {
		return noticeMapper.getPrevById(id);
	}

	@Override
	public Notice getBackById(Integer id) {
		return noticeMapper.getBackById(id);
	}

	@Override
	public boolean insert(Notice notice) {
		return noticeMapper.insert(notice)==1;
	}

	@Override
	public boolean deleteByPrimaryKey(Integer id) {
		return noticeMapper.deleteByPrimaryKey(id)==1;
	}

	@Override
	public boolean insertSelective(Notice record) {
		return noticeMapper.insertSelective(record)==1;
	}

	@Override
	public Notice selectByPrimaryKey(Integer id) {
		return noticeMapper.selectByPrimaryKey(id);
	}

	@Override
	public boolean updateByPrimaryKeySelective(Notice record) {
		return noticeMapper.updateByPrimaryKeySelective(record)==1;
	}

	@Override
	public boolean updateByPrimaryKey(Notice record) {
		return noticeMapper.updateByPrimaryKey(record)==1;
	}

	@Override
	public List<Notice> selectAll() {
		return noticeMapper.selectAll();
	}

	@Override
	public List<Notice> selectPagination(Map<String, Object> map) {
		return noticeMapper.selectPagination(map);
	}

	@Override
	public Integer selectTotal(Map<String, Object> map) {
		return noticeMapper.selectTotal(map);
	}

	@Override
	public boolean updateByPrimaryKeyWithBLOBs(Notice record) {
		return false;
	}

	@Override
	public List<Notice> selectPagination(Notice record) {
		return noticeMapper.selectPagination(record);
	}

	@Override
	public Integer selectTotal(Notice record) {
		return noticeMapper.selectTotal(record);
	}

}
